Host Static Website on Windows 10 IIS

Enable IIS Feature

You may need to enable IIS first before using the app.

attachments/Pasted image 20240702111949.png

attachments/Pasted image 20240702112002.png

Create New Site

Now you can search in your apps for IIS or Internet Information Services and run the GUI

Right click to open context menu to "Add Website..."
attachments/Pasted image 20240702112557.png

Configure the site name and file location
attachments/Pasted image 20240702112701.png

In this example, the root of the website files lives at C:\inetpub\wwwroot\mysite. You may organize your files anyway you'd like. It's recommended that you have these files outside and above your ./User files

Edit Host File

We must tell the #windows machine to resolve the mysite.local domain name

Run Notepad as "Administrator" and open this file

C:\Windows\System32\drivers\etc\hosts

Add in a line at the bottom. Use the server's IP address (static or DHCP given address)

10.42.12.6:80 mysite.local

Credits